<!DOCTYPE html>
<html>
<head>
<!--[if lt IE 7]>
<div class="ie6_error">还在用<strong>漏洞百出的IE6浏览器</strong>么？为了您的网络安全，请升级浏览器 <a target="_blank"
href="http://browsehappy.com">立即升级</a>
</div>
<![endif]-->

<meta charset="utf-8">
<title>购物车步骤1-文具1号</title>
<meta name="description"
content="文具1号作为上海办公用品供货商公司,专为世界500强企业及SOHO办公族提供网上商城一站式办公耗材批发及采购服务,一站式选购办公日用文具用品,厂家直销,好货又便宜【阳光采购就上文具1号 阳光价格 老板放心 品质保障 员工省力】"/>
<meta name="keywords" content="办公用品,办公文具,办公文具网站,文具网站,办公用品网,文具采购网,金万年"/>
<meta name="copyright" content="上海易推信息科技有限公司"/>
<meta name="renderer" content="webkit">
<!--<link rel="stylesheet" type="text/css" href="css/default.css"/>-->
<base href="<?php echo base_url(); ?>"/>
<link rel="stylesheet" href="public/js/layui/css/layui.css">
<link rel="stylesheet" type="text/css" href="public/css/base.css"/>
<link rel="stylesheet" type="text/css" href="public/css/common.css"/>
<link rel="stylesheet" type="text/css" href="public/css/reset.css"/>
<link rel="stylesheet" type="text/css" href="public/css/cart.css?v=0.111156"/>
<link rel="stylesheet" type="text/css" href="public/css/header.css"/>
<link rel="stylesheet" type="text/css" href="public/css/detail.css"/>
<link rel="stylesheet" type="text/css" href="public/css/sameproduct.css"/>
<link rel="stylesheet" type="text/css" href="public/css/popup.css"/>
<link rel="stylesheet" type="text/css" href="public/css/layer.css"/>
<link rel="stylesheet" type="text/css" href="public/css/buyer_cart.css"/>
<link rel="stylesheet" type="text/css" href="public/css/new_add_css.css"/>
<link rel="stylesheet" type="text/css" href="public/css/newaddress.css"/>
<link rel="stylesheet" type="text/css" href="public/css/eProtocolBox.css"/>
<link rel="stylesheet" type="text/css" href="public/css/buyagain.css"/>
<!--[if lte IE 9]>
<script type="text/javascript" src="../public/js/html5shiv-printshiv-3.js"></script>
<![endif]-->
<script src="public/js/jquery.1.7.1-min.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
    <?php $this->load->view('common/header.php'); ?>
    <div class="bg">
        <div id="content" class="tpl-order">
            <div class="flowstep" id="J_Flowstep"
            style="background:url(public/images/navbg.jpg) no-repeat center center;    margin: 40px 0px;">
        </div>
        <div id="J_addresses" class="addresses bbb"><h2>选择收货地址</h2>

            <div class="list">
                <?php foreach ($address as $k => $vo): ?>
                    <div data-id="<?= $vo['id'] ?>"
                        class="addr addr-def <?php if ($addressId && $addressId == $vo['id']): ?>addr-cur<?php elseif (!$addressId && !$zitiId && $vo['is_default'] == 1): ?>addr-cur<?php endif; ?>"
                        style="cursor: pointer;" data-url="<?php echo base_url() ?>order/get_address">
                        <div class="inner" style="    padding-top: 40px; padding-bottom: 0;height: 66px;">
                            <div class="addr-hd" title="<?= $vo['province'] ?><?= $vo['city'] ?><?= $vo['district'] ?>">
                                <span class="city"><?= $vo['province'] ?><?= $vo['city'] ?><?= $vo['district'] ?></span>
                                <span>（</span>
                                <span class="name"><?= $vo['name'] ?></span>
                                <span> 收）</span>
                            </div>
                            <div class="addr-bd">
                                <span class="street"><?= $vo['address'] ?></span>
                                <span class="phone"></span>
                                <span class="last">&nbsp;</span>
                            </div>
                        </div>
                        <ins class="curmarker"></ins>
                        <!--当前是默认地址的时候,显示这两个-->
                        <?php if ($vo['is_default'] == 1): ?>
                            <ins class="deftip">默认地址</ins>
                            <ins class="deftip2">编辑</ins>
                            <?php else: ?>
                                <ins class="deftip" style="background: #ccc !important;display:block;"><a class="setdefault"
                                    href="javascript:;">设为默认</a>
                                </ins>
                                <ins class="deftip2" style="background: #ccc !important;">编辑</ins>
                            <?php endif; ?>

                            <div class="floater"></div>
                        </div>
                    <?php endforeach; ?>
                </div>
                <div class="control">
                    <button class="tc-btn createAddr" type="button">使用新地址</button>
                    <a class="manageAddr" style="color:#c40000;" href="<?php echo base_url() ?>member/address">管理收货地址</a>
                </div>
            </div>

            <?php if($ziti != ""):?>
            <div class="since">
                <p class="title tal" style="background-color: #ffffff;border: none">自提 <span>（具体提货时间，商家会以短信的方式通知到您！）</span>
                </p>
                <ul>
                    <?php foreach ($ziti as $vo): ?>
                        <li data-id="<?= '1_' . $vo['id'] ?>"
                            class="ziti <?php if ($zitiId == '1_' . $vo['id']): ?>choosed<?php endif; ?>">
                            <input type="radio" name="zt" <?php if ($zitiId == '1_' . $vo['id']): ?>checked="checked"<?php endif; ?>>
                            <p class="zt-address" style="width: 110px;"><?= $vo['city'] ?></p>
                            <p class="d-address">地址：<?= $vo['address'] ?></p>
                            <p class="user"> 联系人：<?= $vo['contacts'] ?></p>
                            <p class="phone"> 电话：<?= $vo['mobile'] ?></p>
                        </li>
                    <?php endforeach; ?>
                </ul>
            </div>
            <?php endif;?>

            <form id="resetAddress" method="post">
                <input type="hidden" name="ids" value="<?= $ids ?>">
                <input type="hidden" name="addressId" id="addressId" value="">
            </form>

            <h2>确认订单信息</h2>

            <div class="productlistTitleBox">
                <!--<tr class="tr_first">-->
                    <p class=""><a href="<?php echo base_url('office'); ?>" title="文具1号超市" target="_blank">文具1号超市</a></p>
                    <p style="margin-left:150px;">单价（元）</p>
                    <p>数量</p>
                    <p style="margin-left:80px;">小计(元)</p>
                    <!--                <th class="tube-postage">配送方式</th>-->
                </div>
                <form id="J_orderForm" action="<?php echo base_url() ?>order/create" method="post">
                    <input type="hidden" name="submit_type" value="<?php echo $temp['type'];?>" />
                    <div id="J_orders" class="shine-list">
                        <!--<h2>确认订单信息</h2>-->
                        <div class="bundle">
                            <table class="grid-bundle grid-bundle-B">
                                <thead>
                                </thead>
                                <tbody>
                                    <tr class="grid-main">
                                        <td colspan="5" class="tube-main">
                                            <table>
                                                <tbody>
                                                    <?php $titleMoney = 0;
                                                    if (isset($list['in_range_List'])): ?>
                                                        <?php foreach ($list['in_range_List'] as $key => $value):$titleMoney += $value['quantity'] * $value['price'];
                                                            ?>
                                                            <tr style="border-bottom: 1px dashed #ccc;">
                                                                <td class="tube-img"><a title="" class="img"
                                                                    href="<?php echo base_url() ?>goods/detail?id=<?= $value['goods_id'] ?>"
                                                                    target="_blank"><img height="50"
                                                                    src="<?= $value['default_image'] ?>"></a>
                                                                </td>
                                                                <td class="tube-master">
                                                                    <a href="<?php echo base_url(); ?>goods/detail?id=<?= $value['goods_id'] ?>"
                                                                     target="_blank">
                                                                     <p class="item-title"><?= $value['goods_name'] ?></p>
                                                                     <input type="hidden" name="recid[]" id="recid"
                                                                     value="<?= $value['goods_id'] ?>">
                                                                     <div style="text-align: left;padding-left: 2px;">
                                                                        <?php foreach ($value['sku_info'] as $k => $v): ?>
                                                                            <p>
                                                                                <span class="hd"><?= $k ?> :</span>
                                                                                <span class="bd"><?= $v ?></span>
                                                                            </p>
                                                                        <?php endforeach; ?>
                                                                    </div>
                                                                </a>
                                                            </td>

                                                            <td class="tube-price"
                                                            style="padding-right: 17px;"><?= $value['price'] ?></td>
                                                            <td class="tube-amount"><?= $value['quantity'] ?></td>
                                                            <td class="tube-promo" style="left:0;"
                                                            data-pre="1257.88721"><?= $value['price'] * $value['quantity'] ?></td>
                                                        </td>
                                                    </tr>
                                                <?php endforeach; ?>
                                            <?php endif; ?>
                                        </tbody>
                                    </table>
                                </td>
                            </tr>
                        </tbody>

                    </table>
                </div>
            </div>
            <div class="supplementaryInstruction">
                <div class="aa ovh">
                    <span class="a fl">补充说明:</span>
                    <input name="message" type="text" class="b fl" style="font-size: 12px;">
                    <p class="d fr">快递费: <span><?= isset($list['postage']) ? $list['postage'] : 0 ?></span>元</p>
                    <p class="d fr ywy_c">运送方式:<span>普通配送</span></p>
                </div>
                <p class="bb fr" style="margin-right: 40px;"><span class="a">(含邮费)</span>店铺合计:<span
                    class="b countstore"><?= isset($list['postage']) ? ($titleMoney + $list['postage']) : $titleMoney ?></span>
                </p>
            </div>

            <?php if (isset($list['not_in_range_List'])): ?>
                <br>
                <div class="notSendText">抱歉，以下商品在收货地址内不可售，请重选收货地址或提交订单结算以上商品</div><br>
                <div class="productlistTitleBox">
                    <p class="tube-title">
                        <span class="title-wrap">
                            <span class="bundle-title-a">
                                <a data-mm="" href="<?php echo base_url('office'); ?>" title="" target="_blank">文具1号超市 </a>
                            </span>
                        </span>
                    </p>
                    <p style="margin-left:150px;">单价（元）</p>
                    <p style="margin-left:50px;">数量</p>

                    <p style="margin-left:50px;">小计(元)</p>
                </div>
                <div class="bundle" style="margin-bottom: 23px;background-color:rgba(255, 242, 242, 1);border:none;">
                    <table class="grid-bundle grid-bundle-B" data-bundle="1740429511">
                        <tbody>
                            <?php foreach ($list['not_in_range_List'] as $key => $value): ?>
                                <tr id="<?= $value['goods_id'] ?>" class="grid-main" data-main="57027715693"
                                    data-store-id="139"
                                    data-order-total="243.2">
                                    <td colspan="5" class="tube-main">
                                        <table>
                                            <tbody>
                                                <tr id="order43593426089_0" class="grid-order" data-order="43593426089_0">
                                                    <td class="tube-img">
                                                        <a title="" class="img"
                                                        href="<?php echo base_url(); ?>goods/detail?id=<?= $value['goods_id'] ?>"
                                                        target="_blank"><img height="50"
                                                        src="<?= $value['default_image'] ?>"></a>
                                                    </td>
                                                    <td class="tube-master" colspan="2" style="text-align: left;">
                                                        <p class="item-title">
                                                            <a title="<?= $value['goods_name'] ?>"
                                                                href="<?php echo base_url(); ?>goods/detail?id=<?= $value['goods_id'] ?>"
                                                                target="_blank"><?= $value['goods_name'] ?></a>
                                                            </p>
                                                            <?php foreach ($value['sku_info'] as $k => $v): ?>
                                                                <p>
                                                                    <span class="hd"><?= $k ?> :</span>
                                                                    <span class="bd"><?= $v ?></span>
                                                                </p>
                                                            <?php endforeach; ?>
                                                        </td>
                                                        <td class="tube-price" style="width: 168px;text-align: center"><?= $value['price'] ?></td>
                                                        <td class="tube-amount" style="width: 183px;text-align: center">
                                                            <div class="tc-amount"
                                                            data-order="43593426089_0"><?= $value['quantity'] ?></div>
                                                        </td>

                                                        <td class="tube-sum" style="width: 143px;">
                                                            <p class="sum"><?= $value['price'] * $value['quantity'] ?></p>
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </td>
                                    </tr>
                                <?php endforeach; ?>
                            </tbody>

                        </table>
                    </div>
                <?php endif; ?>


                <h2 class="font-left" style="border-top: 1px dashed #ccc;padding-top: 10px; margin-top:30px;">确认发票信息</h2>
                <p class="font-left" style="border-bottom:1px dashed #ccc;padding-bottom:10px;">
                    <span class="labs">暂不需要</span>

                    <span id="selectInvoice">修改</span>
                </p>
                <?php $approve = 0; ?>
                <?php if ($identity == 1): ?>
                    <h2 class="font-left" style="padding-top: 10px;">选择成本中心<em style="font-size:12px; color:#2b2d2e;">（将便于您对企业账户的数据统计与管理）</em>
                    </h2>
                    <p class="font-left" style="padding-bottom:10px;">
                        <span class="labss">成本中心：</span>
                        <select name="bm" id="" class="selectInvoice-section">
                            <?php foreach ($cost_center as $value): ?>
                                <option value="<?= $value['id'] ?>"><?= $value['name'] ?></option>
                            <?php endforeach; ?>
                        </select>
                        <a target="_blank" href="<?php echo base_url('cost_center/create_cost_center_index'); ?>"
                            class="selectInvoice-section-add"></a>
                        </p>
                    <?php endif; ?>
                    <?php if ($identity != 1 && isset($list['in_range_List']) && isset($approve_info) ): ?>
                    <h2 class="font-left" style="padding-top: 10px;">订单审批信息<em style="font-size:12px; color:#2b2d2e;">（该笔订单将发送至您的上级账户进行审批，审批通过后即可付款完成交易，可在审批订单中查看审批进展）</em>
                    </h2>
                    <div class="approve-pro-list">
                        <?php foreach ($list['in_range_List'] as $key => $value): ?>
                            <?php if (($list_id && !in_array($value['goods_id'], $list_id)) || ($single_quota < $value['price'] && $single_quota != 0)): ?>
                            <div class="item-container">
                                <p class="item-container-warn">
                                    <?php if ($list_id && !in_array($value['goods_id'], $list_id)): ?>
                                        <span class="icon bg-icon_warn_red">提示</span>
                                        该商品已超出您的商品选购范围
                                        <?php $approve = 1; endif; ?>
                                        <?php if ($single_quota < $value['price'] && $single_quota != 0): ?>
                                            <span class="icon"></span>
                                            该商品已超出单品预算<?= ($value['price'] - $single_quota) ?>元
                                            <?php $approve = 1; endif; ?>
                                        </p>
                                        <?php if (($list_id && !in_array($value['goods_id'], $list_id)) || ($single_quota < $value['price'] && $single_quota != 0)): ?>
                                        <div class="item-img" style="margin-left:10px;">
                                            <a class="pic s50"
                                            href="<?php echo base_url(); ?>goods/detail?id=<?= $value['goods_id'] ?>"
                                            title="查看商品详情" target="_blank">
                                            <img src="<?= $value['default_image'] ?>">
                                        </a>
                                    </div>
                                    <div class="item-meta">
                                        <a class="item-link" href="<?php echo base_url(); ?>goods/detail?id=<?= $value['goods_id'] ?>" title="查看商品详情" target="_blank"
                                        style="width: 445px;"><?= $value['goods_name'] ?> </a>
                                        <div class="item-info">
                                            <?php foreach ($value['sku_info'] as $k => $v): ?>
                                                <span><?= $k ?> :</span>
                                                <span><?= $v ?></span><br>
                                            <?php endforeach; ?>
                                            <span>现价 : ¥<?= $value['price'] ?>&nbsp;&nbsp;</span>
                                        </div>
                                    </div>
                                <?php endif; ?>
                            </div>
                        <?php endif; ?>
                    <?php endforeach; ?>
                </div>
            <?php endif; ?>

            <div id="J_checkbar" class="checkbar" style="display: block;">
                <!--进度条模式-->
                <div class="main" style="padding:5px 0;position: relative; background-color: #f4f4f4;">
                    <div class="progress pl29 h80" style="width: 550px; height: 100%; display: inline-block;">
                        <span class="pay-info-labs">
                            <?php if ($identity != 1 && $total_quota != 0): ?>
                                当前可用预算：<em>￥<?= $total_quota_left ?></em>
                                <?php elseif($identity == 1 && $is_account == 1): ?>
                                    账期可用额度：<em>￥<?= $total_quota_left ?></em>
                                <?php endif; ?>
                            </span>
                        </div>
                        <div class="due">
                            <p class="pay-info">
                                (含邮费)
                                <span class="hd" style="font-size: 16px;">实付款：</span>
                                <span class="bd" style="color: #333;">
                                    <span class="tc-rmb">¥</span>
                                    <strong data-pre="<?= isset($list['postage']) ? ($titleMoney + $list['postage']) : $titleMoney ?>"
                                        id="J_ActualPaid"><?= isset($list['postage']) ? ($titleMoney + $list['postage']) : 0 ?></strong>
                                    </span>
                                    <button class="go-btn" type="button" title="提交订单" onclick="order();"
                                    style="background: #c40000;color: white;text-indent: 0;font-size: 16px;">提交订单
                                </button>
                            </p>
                        </div>
                    </div>
                    <strong id="J_Discharge"
                    style="display: none"><?= isset($list['postage']) ? ($titleMoney + $list['postage']) : $titleMoney ?></strong>
                    <input type="hidden" name="regionId" value="<?= $regionId ?>">
                    <input type="hidden" name="address_id" value="<?= $addressId ?>">
                    <input type="hidden" name="invoice_id" value="0">
                    <input type="hidden" name="type" value="0">
                    <input type="hidden" name="express_fee" value="<?= isset($list['postage']) ? $list['postage'] : 0 ?>">
                    <input type="hidden" name="invoice_cont" value="">
                    <input type="hidden" name="uid" value="<?= $customer_id ?>">
                    <input type="hidden" id="content" name="content" value="123">
                </div>
            </form>

        </div>
        <?php $this->load->view('common/bottom.php'); ?>
    </div>
    <div class="mask none"></div>
    <!--修改发票弹框-->
    <div id="layui-layer222" class="layui-layer1-class"
    style="z-index: 99999999; width: 750px; height: auto;text-align: center; display: none;margin-left: -300px; ">
    <!-- <div class="layui-layer-title" style="">
        <div class="popup_title login_hd mb20" move="ok" style="cursor: move;">
            <img class="login_close" src="public/images/close.png" onmousedown="hidePop(event)">
        </div>
    </div> -->
    <div class="layui-layer-content">
        <div class="popup_content_bill pb22 dn layui-layer-wrap" style="display: block;">
            <p class="red fs15 strong mb8 w510 center tal">发票信息</p>
            <div class="w400 center" style="width:550px">
                <div class="ovh mb33" id="j_bill">
                    <span class="fl w120 h35 saveF_bg  fapiao mr20 fs15 strong curp" key="0"
                    style="margin-left: 10px;margin-right: 10px">暂不需要</span>
                    <span class="fl w120 h35 saveF_bg  fapiao mr20 fs15 strong curp" key="4" style="margin-right: 10px">企业普通发票</span>
                    <span class="fl w120 h35 saveF_bg  fapiao mr20 fs15 strong curp" key="2" style="margin-right: 10px">增值税专用发票</span>
                </div>

                <ul class="ul-content" style="margin-left: 20px;padding-left: 5px;">
                    <li class="">
                    </li>
                    <li>
                        <p><span>发票抬头：</span><input type="text" name="title4" value=""></p>
                        <div class="qyptdm">
                            <div class="qyptdm-f"><span class="qyptdm-m">*</span><span
                                class="qyptdm-t" style="width: 100px;">纳税人识别号或统一社会信用代码：
                            </span></div>
                            <input type="text" name="qycode" value="" style="float:left;"/>
                        </div>

                        <dl class="pop-dl d4">

                            <dt>发票内容：</dt>
                            <dd key="2" class="active">办公用品</dd>
                            <dd key="3">电脑配件</dd>
                            <dd key="4">耗材</dd>
                            <dd key="1">明细</dd>
                            <dd key="5">学习用品</dd>
                            <dd key="6">文具用品</dd>
                            <dd key="7">自定义</dd>
                        </dl>
                    </li>
                    <li class="active">
                        <p class="lab"><span>1、填写公司信息</span></p>
                        <p class="iput"><span><font color="red">*</font>单位名称：</span><input type="text" name="company"
                            value="">
                        </p>
                        <p class="iput"><span><font color="red">*</font>纳税人识别码：</span><input type="text" name="texpayer"
                            value="">
                        </p>
                        <p class="iput"><span><font color="red">*</font>注册地址：</span><input type="text" name="address"
                            value="">
                        </p>
                        <p class="iput"><span><font color="red">*</font>注册电话：</span><input type="text" name="tel"
                            value="">
                        </p>
                        <p class="iput"><span><font color="red">*</font>开户银行：</span><input type="text" name="bank"
                            value="">
                        </p>
                        <p class="iput"><span><font color="red">*</font>银行账户：</span><input type="text" name="card"
                            value="">
                        </p>
                        <p class="lab"><span>2、选择发票内容</span></p>
                        <dl class="pop-dl d2">
                            <dt>发票内容：</dt>
                            <dd key="1" class="active">明细</dd>
                            <dd key="2" style="display: none;">办公用品</dd>
                            <dd key="3" style="display: none;">电脑配件</dd>
                            <dd key="4" style="display: none;">耗材</dd>
                        </dl>
                    </li>
                </ul>
                <div class="ovh w230 center">
                    <div class="mr20 fl">
                        <input type="submit" class="iSubmit w115 h29 iSaveF" value="">
                    </div>
                    <div class="fl">
                        <input type="button" class="iSubmit w95 h29 iClose" value="">
                    </div>
                </div>
            </div>
        </div>
    </div>
    <a class="layui-layer-ico layui-layer-close layui-layer-close1" href="javascript:;"></a>
</div>
<!--审批提醒弹框-->
<div class="pop pop-account-activation bg-padding-inside none approve_remind" style="height: 400px;width: 600px;">
    <a href="javascript:;" class="close bg-btn_close_n"
    style="background: url(public/images/index-css_sprites.png) -196px -544px;"></a>
    <p class="top-tit">
        <span class="bg-logo_popup"></span>
    </p>
    <div class="">
        <p class="tit" style="margin-top: 20px;width: 400px;margin-left: 100px;color: gray;font-size: 14px;">*您的当前订单
            <?php $allmoney = isset($list['postage']) ? ($titleMoney + $list['postage']) : $titleMoney; ?>
            <?php if ($approve == 1 || ($allmoney > $total_quota_left && $total_quota != 0)): ?>
                已经超出限定范围
            <?php endif; ?>
            将提交上级进行审批
        </p>
        <div style="margin-top: 20px;margin-left: 100px;font-size: 13px;">
            账号：<span style="font-weight: bold;margin-left:10px; "><?= $parent['username'] ?></span>
        </div>
        <div style="margin-top: 20px;margin-left: 100px;font-size: 13px;">
            邮箱：<span style="font-weight: bold;margin-left:10px; "><?= $parent['email'] ?></span>
        </div>
        <div style="margin-top: 20px;margin-left: 100px;font-size: 13px;">
            <span style="display: block;float: left;">备注：</span><textarea name="content"
            style="width: 300px;height: 50px; margin-left: 10px;"
            placeholder="(选填)可输入备注信息，有助通过"></textarea>
        </div>
        <div class="btn-box">
            <button class="adjustment-budget-submit approve_remind_tijiao">确 定 提 交</button>
        </div>
    </div>
</div>
<!--添加新地址容器-->

<div class="create_addr">
    <div class="tc-popup addrmaker dn">
        <div class="tc-popup-header">修改地址</div>
        <div class="tc-popup-content">
            <form id="winNewAddress" action="<?php echo base_url(); ?>member/address_add" method="post">
                <style>table td {
                    border: 0
                }</style>
                <table>
                    <tbody>
                        <tr>
                            <th>
                                <label>所在地区：</label><em>*</em>
                            </th>
                            <td border="0" id="admin_company_form_info">
                                <select name="province" id="province">
                                    <option value="0" selected="selected">请选择省份...</option>
                                </select>
                                <select name="city" id="city">
                                    <option value="0" selected="selected">请选择市...</option>
                                </select>
                                <select name="district" id="district">
                                    <option value="0" selected="selected">请选择县/区...</option>
                                </select>
                                <input type="hidden" name="regionId" id="regionId" value="">
                            </td>
                        </tr>
                        <tr>
                            <th><label>邮政编码：</label><em></em></th>
                            <td><input type="text" class="tc-text" name="postcode" value=""></td>
                        </tr>
                        <tr>
                            <th><label for="address">街道地址：</label><em>*</em></th>
                            <td><textarea id="address" class="tc-text" name="address"></textarea></td>
                        </tr>
                        <tr>
                            <th><label for="name">收货人姓名：</label><em>*</em></th>
                            <td><input id="name" type="text" class="tc-text" name="name" value=""></td>
                        </tr>
                        <tr>
                            <th><label for="phone">手机：</label><em>*</em></th>
                            <td><input id="phone" type="text" class="tc-text" name="phone" value="">
                            </td>
                        </tr>
                        <tr>
                            <th>电话：<em></em></th>
                            <td><input type="text" class="tc-text" name="addrArea" value=""> - <input type="text"
                                class="tc-text"
                                name="addrNum"
                                value=""> - <input
                                type="text" class="tc-text" name="addrExt" value=""><span class="tip">格式：区号 - 电话号码 - 分机号</span>
                            </td>
                            <input type="hidden" name="tel" id="tel">
                            <input type="hidden" name="id">
                        </tr>

                        <tr>
                            <th></th>
                            <td>
                                <button class="primary" type="submit">确定</button>
                                <button class="quit_addr" type="button">取消</button>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </form>
        </div>
    </div>
    <?php
    $url = $this->config->item("shop_url") . 'companymanagerapi/company_logout/';
    $check_url = $this->config->item("shop_url") . 'companymanagerapi/user_status/';
    $data_arr['time'] = time();
    $data_arr['key'] = md5($this->config->item("token_const_wjyh") . $data_arr['time']);
    ?>
    <script type="text/javascript">
        $(function () {
//获取省市区
$('#admin_company_form_info').distpicker({
    province: '请选择...',
    city: '请选择...',
    district: '请选择...',
    autoSelect: ""
});

//地址不存在，默认弹出添加地址框

var address = <?php echo json_encode($address)?>;
if (address[0] == undefined) {
    $('.addrmaker').removeClass('dn');
    $('.mask').removeClass('none');
}


});
        $('#selectInvoice').click(function () {
            $("#layui-layer222").css('display', 'block');
        })
        var flag = true;
        function order() {
            var regionId = $.trim($('input[name=regionId]').val());
            var recid = $("#recid").val();

            if (recid == undefined) {
                alert('请选择商品');
                return false;
            }
            if (regionId == '') {
                alert('请选择收货地址');
                return false;
            }
            <?php if(($approve == 1 || ($allmoney > $total_quota_left && $total_quota != 0)) && $identity != 1){?>
                $('.approve_remind').removeClass('none');
                $('.approve_remind').show();
                $('.mask').removeClass('none');
                $('.mask').show();
            <?php }else{?>
//判断商城站是否登录
if(flag == false){
    return false;
}
flag = false;
$.ajax({
    type: "get",
    dataType: "jsonp",
    url: "<?php echo $check_url;?>",
    data: {'time': '<?php echo $data_arr['time'];?>', 'key': '<?php echo $data_arr['key'];?>'},
    jsonp: 'callback',
    async: false,
    jsonpCallback: "abc2",
    success: function (data) {

    },
    error: function (XMLHttpRequest, textStatus, errorThrown) {
        console.log('someting is wrong')
    }
});
<?php }?>
}

$('.approve_remind_tijiao').click(function () {
    var content = $("textarea[name=content]").val();
    $("#J_orderForm #content").val(content);
    if(flag == false){
        return false;
    }
    flag = false;
    $.ajax({
        type: "get",
        dataType: "jsonp",
        url: "<?php echo $check_url;?>",
        data: {'time': '<?php echo $data_arr['time'];?>', 'key': '<?php echo $data_arr['key'];?>'},
        jsonp: 'callback',
        async: false,
        jsonpCallback: "abc2",
        success: function (data) {

        },
        error: function (XMLHttpRequest, textStatus, errorThrown) {
            console.log('someting is wrong')
        }
    });
})

function abc2(data) {
    console.log(data)
    if (data['code'] == 200) {
        console.log('ok');
        $('#J_orderForm').submit();
    } else {
        console.log('no');
        window.location.href = '<?php echo $this->config->item("shop_url");?>mMLogin.html';
    }
}

$('.close').click(function () {
    $('.approve_remind').addClass('none');
    $('.approve_remind').hide();
    $('.mask').addClass('none');
    $('.mask').hide();
})
</script>

<script type="text/javascript" src="public/js/layer.js?v=1523346815"></script>
<script type="text/javascript" src="public/js/layerUtils.js?v=1523346815"></script>
<script type="text/javascript" src="public/js/buyer_cart.js?v=1523346825"></script>
<script type="text/javascript" src="public/js/buyNew.js?v=<?php echo time(); ?>"></script>
<script type="text/javascript" src="public/js/purchase.js?v=1523346855"></script>
<script type="text/javascript" src="public/js/progress.js?v=1523346815"></script>
<script type="text/javascript" src="public/js/cart_timeover.js?v=1523346815"></script>
<script src="public/js/jquery.imageScroller.js" type="text/javascript" charset="utf-8"></script>
<script src="public/js/jquery.imagezoom.min.js" type="text/javascript" charset="utf-8"></script>
<script src="public/js/detail.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="public/js/distpicker/distpicker.data.js "></script>
<script type="text/javascript" src="public/js/distpicker/distpicker.js"></script>
<style type="text/css">
#layui-layer222 {
    margin-left: -300px !important;
}
.ul-content li{
    text-align: left;
}
</style>
</body>
</html>